package com.study.springboot.model.vo;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * @author wei.zhao
 * @description:
 * @date 2021年12月04日 23:26
 */
@Data
@Component
@PropertySource(value = "classpath:defaultStudent.properties", encoding = "UTF-8")//用于指定要读取的配置文件
@ConfigurationProperties(prefix = "student")//指定要读取的配置文件属性的前辍
public class DefaultStudent {
    private String name;
    private int age;
}
